Class Game2


public class Game2 extends Object
Write a description of class Game2 here.
Version:
9-28-24
Author:
L Kedigh
  • Field Details

    • seedST

      public static int seedST
    • rndST

      public static Random rndST
    • outputStatsOutput

      public static boolean outputStatsOutput
    • showOutcomeLineST

      public static boolean showOutcomeLineST
    • showPauseAfterOutcomeST

      public static boolean showPauseAfterOutcomeST
    • teamOutsST

      public static int teamOutsST
    • teamRunsST

      public static int teamRunsST
    • teamErrorsST

      public static int teamErrorsST
    • teamHitsST

      public static int teamHitsST
    • baseRunnersST

      public static Runners baseRunnersST
    • pitchRollResults

      public final String[] pitchRollResults
    • pitchChartLimits

      public int[] pitchChartLimits
    • vCurrentBatterIndex

      public int vCurrentBatterIndex
    • hCurrentBatterIndex

      public int hCurrentBatterIndex
    • visitorsLineUp

      public LineUp visitorsLineUp
    • visitingPitcher

      public Pitcher visitingPitcher
    • homeLineUp

      public LineUp homeLineUp
    • homePitcher

      public Pitcher homePitcher
    • cvScore

      public int cvScore
    • chScore

      public int chScore
    • cvHits

      public int cvHits
    • chHits

      public int chHits
    • cvErrors

      public int cvErrors
    • chErrors

      public int chErrors
    • vs

    • hs

    • inn

      public int inn
    • counter

      public int counter
    • playResult

      public String playResult
    • outcome

      public String outcome
  • Constructor Details

    • Game2

      public Game2()
  • Method Details

    • play

      public void play(int numOfGames, int vID, int hID)
      Plays a series of games with two teams using set lineups.

      Teams are identified by a Team ID number which is made up the following way: [2 digit year] a two digit [unique ID number] and [00]. Each team has 5 example lineups used during the season and they are idenfied by the last two digits. Lineups are identified by changing the last two digits from 00 to 01,02,03,04, or 05 for team linups. Usually the lineups are are at games 30, 60, 90, 120, and 150. These numbers change if I need additional vs LEFTY lineups.

        2024 Philadelphia Phillies 242700 
        2024 Atlanta Braves        242400 
        1967 Atlanta Braves        672400 
        1967 New York Mets         672601  
        1967 Baltimore Orioles     670100 
        1967 Los Angeles Dodgers   672500 
        1967 Cleveland Indians     670400 
        1967 Chicago Cubs          672200 
        1967 Cincinnati Reds       672300 
        1967 Pittsburg Pirates     672800
       
      Parameters:
      numOfGames - The number of games to be played.
      vID - Visiting Team ID number.
      hID - Home Team ID number.
    • getPitchRollResult

      public String getPitchRollResult(Pitcher p, PositionPlayer b)

      First roll using the pitching chart, determines and returns WALK,OVERS,CORNERS, or STRIKE OUT.
      The first chart I call the pitching chart.
      Two dice determine if the batter is walked (WALK) or struck out(STRIKE OUT) which ends the appearance.
      CORNERS and OVERS results in more throws of dice and additional charts.

      Parameters:
      p - The Pitcher in the appearance.
      b - The Batter in the appearance.
      Returns:
      returns one of the following- WALK,OVERS,CORNERS, or STRIKE OUT